FROM ubuntu
LABEL description="aliyun source, update"

COPY aliyun.source /etc/apt/sources.list
COPY start.sh /opt/start.sh

ENV KONG_HOME /opt/kong




ENV KONG_DATABASE_ENV_POSTGRES_USER=kong
ENV KONG_DATABASE_ENV_POSTGRES_DB=kong
ENV KONG_DATABASE=postgres
ENV KONG_ADMIN_LISTEN="0.0.0.0:8701, 0.0.0.0:8744 ssl"




WORKDIR /opt

RUN  apt clean all  && apt update && apt upgrade -y \
        && apt-get install -y wget software-properties-common openssl libpcre3 procps perl\
        && wget http://dev8.cn:8001/env/kong-1.4.0.bionic.amd64.deb -P /opt \
        && dpkg -i /opt/kong-1.4.0.*.deb \
        && rm -rf /opt/kong-1.4.0.bionic.amd64.deb

EXPOSE 8701,8744,8000

ENTRYPOINT ["bash","/opt/start.sh"]
